always record a frame end time when profiling
authorMatthias Clasen <mclasen@redhat.com>
Thu, 16 May 2019 19:45:30 +0000 (19:45 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 16 May 2019 19:45:30 +0000 (19:45 +0000)
We need to keep this time, or we may end up with
negative frame intervals.

gdk/gdkframeclockidle.c

index a917176993e5ca16788132ec7533ba417c02c81e..bb1e9c359c9b2ff04ddf08fb9c60ef10c0b65151 100644 (file)
@@ -461,12 +461,11 @@ gdk_frame_clock_paint_idle (void *data)
               /* the ::after-paint phase doesn't get repeated on freeze/thaw,
                */
               priv->phase = GDK_FRAME_CLOCK_PHASE_NONE;
-
+            }
 #ifdef G_ENABLE_DEBUG
-              if (GDK_DEBUG_CHECK (FRAMES) || gdk_profiler_is_running ())
-                timings->frame_end_time = g_get_monotonic_time ();
+            if (GDK_DEBUG_CHECK (FRAMES) || gdk_profiler_is_running ())
+              timings->frame_end_time = g_get_monotonic_time ();
 #endif /* G_ENABLE_DEBUG */
-            }
           G_GNUC_FALLTHROUGH;
 
         case GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS: